package com.ssy.file.service.service;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.dto.response.FileItemResponse;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface FileUploadService {
    /**
     * 文件上传
     * @author wrc
     * @date 2020/5/29
     */
    Wrapper<String> upload(MultipartFile request, Integer fileType);

    /**
    * 文件上传
    * @author wrc
    * @date 2020/9/23
    */
    Wrapper<FileItemResponse> uploadPrefix(MultipartFile file, Integer fileType, String prefix);


        /**
         * 文件删除
         * @author wrc
         * @date 2020/5/29
         */
    Wrapper<Void> delete(String fileUrl, Integer fileType);


    Wrapper<List<FileItemResponse>> uploadBatch(HttpServletRequest request, @RequestParam(value = "fileType") Integer fileType, String prefix);


}
